<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<style>
  .isRed {
    color: red;
  }
</style>
<body>
<div id="app">
  <ul>
    <li v-for="(item, index) in movies" :key="index" :class="{isRed: Red}">
      {{item}}
      <p @click="deleteHis(index)">删除</p>
    </li>
  </ul>
</div>
<script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el: '#app',
    data: {
      message: "你好",
      movies: ["万古神帝", "三寸人间", "圣墟", "元尊"],
      Red:true
    },
    methods: {
      deleteHis (index) {
        this.movies.splice(index, 1)
      }
    }
  })
</script>
</body>
</html>
